// by Xeno
private ["_vehicle"];
#include "x_setup.sqf"
#include "x_macros.sqf"

#define __Poss _poss = x_sm_pos select 0;
#define __PossAndOther _poss = x_sm_pos select 0;_pos_other = x_sm_pos select 1;

x_sm_pos = [[2943.5779,6180.8242,0], [2977.009,6125.4922,0], [3002.7258,6216.8555,0]]; // index: 6,   Hangar near Zelegonorsk
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	d_current_mission_text = "The enemy is building a hangar at Swonto Airport. Destroy the hangar before the enemy can make good use of it.";
	d_current_mission_resolved_text = "Good job. The hangar is down.";
};

if (isServer) then {
	__PossAndOther
	_pos_other2 = x_sm_pos select 2;
	_vehicle = "Land_SS_hangar" createvehicle (_poss);
	#ifndef __TT__
	[_vehicle] execFSM "fsms\XCheckSMHardTarget.fsm";
	#else
	[_vehicle] execFSM "fsms\XCheckSMHardTargetTT.fsm";
	#endif
	_vehicle setDir 190;
	sleep 2.123;
	["specops", 1, "basic", 1, _pos_other,90,true] spawn XCreateInf;
	sleep 2.012;
	["shilka", 1, "bmp", 2, "tank", 2, _pos_other2,1,80,true] spawn XCreateArmor;
	__AddToExtraVec(_vehicle)
};

if (true) exitWith {};